﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="NewsList.aspx.cs" Inherits="IService.NewsList" %>

<%@ Register Src="~/InfoControls/Pagination.ascx" TagName="Pagination" TagPrefix="suc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css" media="screen" id="less:iservice-css-styles">
        .listitems:hover {
            background-color: #C8FB7C;
            color: #1919F8;
        }

        .listitems .item40 {
            width: 40px;
        }

        .listitems .item60 {
            width: 60px;
        }

        .listitems .item80 {
            width: 80px;
        }

        .listitems .item100 {
            width: 100px;
        }

        .listitems .item120 {
            width: 120px;
        }

        .listitems .item160 {
            width: 160px;
        }

        .odd {
            background-color: rgb(255, 255, 255);
        }

        .even {
            background-color: rgb(246, 254, 234);
        }

        .opt {
            width: 35px;
            height: 25px;
            text-align: center;
            display: block;
            position: relative;
            cursor: pointer;
        }

        .icon-sprite {
            left: 10px;
            top: 50%;
            width: 16px;
            height: 16px;
            margin-top: -8px;
            display: inline-block;
            position: absolute;
            background: url(../Admin/Style/images/icon.png) no-repeat;
        }

        .icon-edit {
            background-position: -25px -19px;
        }

        .icon-delete {
            background-position: -46px -20px;
        }

        .icon-view {
            background-position: -4px -19px;
        }

        .icon-list {
            background-position: -79px 0px;
        }

        .right-button06 {
            font-family: "宋体";
            font-size: 12px;
            color: #174B73;
            height: 20px;
            width: 24px;
            background-image: url(../Admin/Style/images/button08.gif);
            border-top-width: 0px;
            border-right-width: 0px;
            border-bottom-width: 0px;
            border-left-width: 0px;
        }
    </style>

    <script type="text/javascript">
        function viewcontent(newsid) {
            window.open("NewInfo.aspx?newsId=" + newsid, "", "width=800,height=510,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0");
        }
    </script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightMainContent" runat="server">

    <table id="subtree1" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="40" class="font42">
                            <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646"
                                class="newfont03">
                                <tr class="CTitle">
                                    <td height="22" colspan="10" align="center" style="font-size: 16px;background-color: white;">新闻列表
                                    </td>
                                </tr>
                                <tr align="center" bgcolor="#EEEEEE">
                                    <td>标题
                                    </td>
                                    <td>发布时间
                                    </td>
                                    <td>内容简介
                                    </td>
                                    <td>查看
                                    </td>
                                </tr>
                                <asp:Repeater ID="rptNewsList" runat="server">
                                    <ItemTemplate>
                                        <tr class="listitems <%#(rptNewsList.Items.Count%2==0?"odd":"even")%>">
                                            <td nowrap="nowrap">
                                                <%--<a href="#" onclick="viewcontent(<%#Eval("Id")%>)">
                                                    <%#Eval("NewsTitle") %></a>--%>
                                                <a href="NewInfo.aspx?newsId=<%#Eval("Id")%>">
                                                    <%#Eval("NewsTitle")%></a>
                                            </td>
                                            <td nowrap="nowrap" class="item80">
                                                <%#Eval("CreateTime")%>
                                            </td>
                                            <td nowrap="nowrap">
                                                <%#GetShortNewsContent(Eval("NewsContent").ToString())%>
                                            </td>
                                            <td class="item40">
                                                <a class="opt" href="NewInfo.aspx?newsId=<%#Eval("Id")%>"><span class="icon-sprite icon-view"></span></a>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </td>
                    </tr>
                </table>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="6">
                            <img alt="" src="../Style/images/spacer.gif" width="1" height="1" />
                        </td>
                    </tr>
                    <tr>
                        <td height="33">
                            <suc:Pagination ID="Pagination" PageSize="12" runat="server"></suc:Pagination>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

</asp:Content>
